package tjava.apt;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Set;

import com.sun.mirror.apt.AnnotationProcessor;
import com.sun.mirror.apt.AnnotationProcessorEnvironment;
import com.sun.mirror.apt.AnnotationProcessorFactory;
import com.sun.mirror.declaration.AnnotationTypeDeclaration;

public class TjavaFactory implements AnnotationProcessorFactory {

	public Collection<String> supportedOptions() {
		return Collections.emptyList();
	}

	public Collection<String> supportedAnnotationTypes() {
		List<String> types = new ArrayList<String>();
		types.add("tjava.annotations.TemplateInstance");
		return types;
	}

	public AnnotationProcessor getProcessorFor(
			final Set<AnnotationTypeDeclaration> atds,
			final AnnotationProcessorEnvironment env) {
		return new TjavaGeneratorProcessor(env);
	}
}